<?php

/*
mae. 1.0
Connecting to the database
*/

// loading module for current database type
/* old style connecting
require_once('internal/Database.'.$mae['db_type'].'.php');
$db = new Database($mae['db_server'], $mae['db_user'], $mae['db_password'], $mae['db_base']);
// change encoding to UTF-8!
$db->query('SET NAMES utf8');*/

require_once('internal/Database.php');
$db = new Database($mae['db_type'], $mae['db_server'], $mae['db_user'], $mae['db_password'], $mae['db_base']);
try { $db->query('SET NAMES utf8'); } catch (Exception $e) {}
?>
